package io.zhoujie.modules.app.dao;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.zhoujie.modules.app.entity.AppReplyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author zhoujie
 * @email 813685764@qq.com
 * @date 2024/5/6 21:18
 */
@Mapper
public interface AppReplyDao extends BaseMapper<AppReplyEntity> {
    List<AppReplyEntity> selectReplyList(AppReplyEntity appReplyEntity);

    List<JSONObject> listReply(@Param("postId") Integer postId);

    AppReplyEntity selectReplyByID(Integer id);

    int insertReplys(@Param("userId") Integer userId, @Param("postId") String postId, @Param("content") String content, @Param("date") Date date,@Param("top") String top);

    int setTop(Integer reply);
}
